package ecommerce.factory;

import ecommerce.factory.dao.mysql.MySQLFactoryDAO;
import ecommerce.factory.dao.oracle.OracleFactoryDAO;
import ecommerce.factory.interfaces.CategoriaDAO;
import ecommerce.factory.interfaces.ProductoDAO;

public abstract class FactoryDAO {

    public static final int MYSQL = 1;
    public static final int ORACLE = 2;

    public abstract CategoriaDAO getCategoriaDAO();
    public abstract ProductoDAO getProductoDAO();
    
    public static FactoryDAO getFactoryDAO(int tipo) {
        FactoryDAO facDAO = null;
        switch(tipo){
            case MYSQL:
                facDAO = new MySQLFactoryDAO();
                break;
            case ORACLE:
                facDAO = new OracleFactoryDAO();
                break;
        }
        return facDAO;
    }
}
